﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OpenWaves.Pagination;
using EPiServer.Core;

namespace $rootnamespace$.Controls
{
    public partial class Pager : System.Web.UI.UserControl
    {
        public IPaginationViewModel Model;

        private IPaginationUrlFactory urlFactory;

        protected override void OnInit(EventArgs e)
        {
            this.urlFactory = new PaginationUrlFactory(Request);
        }

        protected string GetPageUrl(OpenWaves.Pagination.PageViewModel page)
        {
            return this.urlFactory.GetPageUrl(page).ToString();
        }
    }
}